import { COUNTER_RESET } from "./constant";
import initialState from './initialState'

// action
export const counterReset = ()=>{
  return {
    type: COUNTER_RESET
  };
}

// reducer
export const reducer = (state = initialState, action) => {
  switch (action.type) {
    case COUNTER_RESET:
      return { count: 0 }
    default:
      return state
  }
}